<?php
use yii\helpers\Url;
?>
    <!-- end sidebar -->
    <link rel="stylesheet" href="assets/admin/css/compiled/user-list.css" type="text/css" media="screen" />
    <!-- main container -->
    <div class="content">
        <div class="container-fluid">
            <div id="pad-wrapper" class="users-list">
                <div class="row-fluid header">
                    <h3>分类列表</h3>
                    <div class="span10 pull-right">
                        <a href="<?=Url::to(['category/add'])?>" class="btn-flat success pull-right">
                            <span>&#43;</span>添加新分类</a></div>
                </div>
                <?php if(Yii::$app->session->hasFlash('info')){
                    echo Yii::$app->session->getFlash('info');
                }?>
                <div class="row-fluid table">
                    <table class="table table-hover">
                        <thead>
                            <tr>
                                <th class="span3 sortable">
                                    <span class="line"></span>分类ID</th>
                                <th class="span3 sortable">
                                    <span class="line"></span>分类名称</th>
                                <th class="span3 sortable align-right">
                                    <span class="line"></span>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach($list as $key => $val){?>
                            <tr class="first">
                                <td><?= $val['cateid']?></td>
                                <td><?= $val['title']?></td>
                                <td class="align-right">
                                    <a href="<?= Url::to(['category/update','cateid'=>$val['cateid']])?>">编辑</a>
                                    <a href="<?= Url::to(['category/del','cateid'=>$val['cateid']])?>">删除</a></td>
                            </tr>
                            <?php }?>
                        </tbody>
                    </table>
                </div>
                <div class="pagination pull-right"></div>
                <!-- end users table --></div>
        </div>
    </div>
    <!-- end main container -->
